package sparkcore.day3.lesson01

import org.apache.spark.{SparkConf, SparkContext}

/**
  * Created by Administrator on 2018/4/24.
  * textFile
  */
class SecondarSortKey(val first:Int,val second:Int)
  extends Ordered[SecondarSortKey] with Serializable{
  override def compare(that: SecondarSortKey): Int = {
    if(this.first != that.first){
      this.first - that.first
    }else{
      this.second - that.second
    }
  }
}


